def bubbleSort(ls):
    for i in range(len(ls)):
        for j in range(len(ls) - i - 1):
            if ls[j] > ls[j + 1]:
                ls[j], ls[j + 1] = ls[j+1], ls[j]
    return ls


a = [41, 51, 71, 11, 13, 10, 16, 10, 12, 19, 18]
print(bubbleSort(a))

# def bubbleSort(ls):
#     for i in range(len(ls)):
#         for j in range(len(ls) - i - 1):
#             if ls[j] > ls[j + 1]:
#                 ls[j], ls[j + 1] = ls[j + 1], ls[j]
#     return ls
#
#
# a = [41, 51, 71, 11, 13, 10, 16, 10, 12, 19, 18]
# print(bubbleSort(a))
